package file;

import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 74646
 * Date: 2022-06-15
 * Time: 17:04
 */
public class Demo4 {
    public static void main(String[] args) {
        // 删除文件夹
        File file1 = new File("./TEST");
        // 删除文件
        File file2 = new File("./NewTest.sql");

        System.out.println(file1.exists()); // 判断文件夹是否存在
        System.out.println(file2.exists()); // 判断文件是否存在
        file1.delete();
        file2.delete();
        System.out.println(file1.exists());
        System.out.println(file2.exists());
    }
}
